package com.noizycat.ver2.view.adaptor;

import java.util.ArrayList;

import android.content.Context;
import android.os.Handler;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.noizycat.ver2.dto.TweetDto;

public class TweetLineAdaptor extends ArrayAdapter<TweetDto> {

    public static final int TIME_LINE = 1;
    public static final int REPLY_TIME_LINE = 2;
    public static final int DIRECT_MESSAGE_LINE = 3;
    public static final int PROFILE_LINE = 4;

    private ArrayList<TweetDto> tweetList;
    private Context context;
    private LayoutInflater inflater;
    private TweetDto tweetDto;
    private int callType;
    private int action = 0;
    private String TAG = "TweetLineAdaptor";
    private View view;
    private Handler handler;

    public TweetLineAdaptor(Context context, int textViewResourceId,
            ArrayList<TweetDto> tweetList) {

        super(context, textViewResourceId, tweetList);
        inflater = (LayoutInflater) context
                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        this.tweetList = tweetList;
        this.context = context;
    }

    public View getView(final int position, View convertView, ViewGroup parent) {

        // final View view = inflater.inflate(R.layout.listview_tweet, null);
        tweetDto = tweetList.get(position);
        TextView t = new TextView(context);
        t.setText(tweetDto.getTweetUser().getScreemName() + " : " + tweetDto.getTweetText());
        // view.setBackgroundDrawable(context.getResources().getDrawable(
        // R.color.list_item_selecter));
        return t;
    }

}
